﻿using MyProject.Core;
using System.ComponentModel.DataAnnotations;
using System.Reflection;

namespace MyProject.Entities.User
{
    public class User : NotifyPropertyChanged
    {
        [MyTitle("ID")]
        public int? id { get; set; }

        [Required(ErrorMessage = "Поле является обязательным"), MaxLength(30), MyTitle("Имя")]
        public string name { get; set; } = "";

        [Required(ErrorMessage = "Поле является обязательным"), MaxLength(30), MyTitle("Фамилия")]
        public string surname { get; set; } = "";

        [MaxLength(30), MyTitle("Отчество")]
        public string patronymic { get; set; } = "";

        [MyTitle("Паспорт")]
        public MyProject.Entities.Passport.Passport? passport { get; set; } = new();
        public int? passportId { get; set; } = null;

        [MyTitle("Договор")]
        public MyProject.Entities.EmploymentContract.EmploymentContract? contract { get; set; } = new();
        public int? contractId { get; set; } = null;

        [MyTitle("М/ж")]
        public MyProject.Entities.Address.Address? place_residence { get; set; } = new();
        public int? place_residenceId { get; set; } = null;

        [MyTitle("Регистрация")]
        public MyProject.Entities.Address.Address? registration { get; set; } = new();
        public int? registrationId { get; set; } = null;
    }
}
